package com.my.study.handler;

import com.my.study.utils.XmlBeanUtil;
import org.springframework.stereotype.Component;

import java.util.Set;
@Component
public class WhiteListHandler {

    private static Set<String> whiteSet;

    static {
        whiteSet = XmlBeanUtil.readValue("white_list.xml");
    }

    /**
     * 白名单校验
     *
     * @param path
     * @return
     */
    public Boolean isWhiteList(String path){
        return whiteSet.contains(path);
    }
}
